<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
$(document).ready(function() {
	$("#findBtn").click(function(){
		var id=$("#findId").val();
				
	 	if($("#findId").val() == ""){
			alert("아이디를 입력해주세요!");
			$("#findId").focus();
			return;
		} else if ($("#password").val() == "") {
			alert("이름을 입력해 주세요");
			$("#findName").focus();
			return;
		}
	 	
	 	$.ajax({
			type:"POST",
			url:"wedding.do",
			data:"command=findPass&id="+id+"&hint="+name,
			dataType:"json",
			success:function(data){
				if(data.flag == true){
					$("#findPassText").html(id+"[찾았다]");
				}else{
					alert(id+"못찾았다");
				} 
			}
		});
	});
	
	
	$("#cancleBtn").click(function(){
		location.href="wedding.do?command=home";
	});
});
</script>

</head>
<body>
<input type="hidden" name="command" value="findPass">
<img src="${initParam.root}/img/findPassTop.gif"><br><br>
<span style="margin-left: 350px;"><font style="font-size: 12px">아&nbsp;이&nbsp;디</font></span><input type="text" name="id" id="findId" size="11"><div id="findPassText"></div><br>
<span style="margin-left: 350px;"><font style="font-size: 12px">&nbsp;이&nbsp;름&nbsp;&nbsp;&nbsp;</font></span><input type="text" name="name" id="findName" size="11"><br>
<br>
<img src="${initParam.root}/img/confirm_button.gif" id="findBtn" style="margin-left: 380px">
<img src="${initParam.root}/img/cancel_btn.gif" id="cancleBtn" style="margin-left: 3px">

</body>
</html>